<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>登录页面</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" th:href="@{|/bootstrap-4.6.2/css/bootstrap.min.css|}">

    <link th:href="@{|../css/login.css|}" rel="stylesheet" type="text/css" media="all" />
    <script th:src="@{../jquery/jquery-3.6.0.min.js}"></script>
    <script th:src="@{../jquery/jquery.cookie.js}"></script>
    <script th:src="@{../bootstrap-4.6.2/js/bootstrap.bundle.min.js}"></script>
    <script th:src="@{|/js/getContextPath.js|}"></script>



</head>
<body>
<div class="container">
    <div class="login_po w">
        <div class="login_form">
            <form  th:action="@{/loginIn}" method="post">
                <div class="title_form">
                    <h2>用户登陆</h2>
                </div>
                <div class="form-group">
                    <label for="username">账号:</label>
                    <input type="text" class="form-control"  placeholder="请输入学号或者管理员账号" id="username" name="username">
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" class="form-control" name="password" id="password" placeholder="请输入密码">
                </div>
                <div>
                    <p th:if="${param.error}"class="text-danger text-center">用户名或密码有误，请重试</p>
                </div>
                <div style="margin-top: 5px">
                    <input  style="float: left" type="submit" class="btn btn-primary" value="登陆">
                    <input style="float: right" type="button" onclick="register()"  class="btn btn-primary" value="注册">
                    
                </div>
            </form>
        </div>
    </div>

</div>
<script>
    function register() {
        location.href ="/toRegister";
    }
</script>
</body>
</html>